package datasource

import (
	"context"
	"gitee.com/go-caipu-team/go-caipu-plugin-sdk/backend"
)

func ExampleQueryTypeMux() {
	mux := NewQueryTypeMux()
	mux.HandleFunc("queryTypeA", func(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error) {
		return nil, nil
	})
	mux.HandleFunc("queryTypeB", func(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error) {
		return nil, nil
	})
	_ = ServeOpts{
		QueryDataHandler: mux,
	}
}
